home *** CD-ROM | disk | FTP | other *** search
- /*
- * SaveBufferAs.ifx.pre
- * Written by Thomas Krehbiel
- *
- * Save main buffer.
- *
- * Inputs:
- * Word(Arg(1),1) = Sequence number (?)
- * Word(Arg(1),2) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- base = 'Autofx_SaveBufferAsILBMalf_'
-
- lastpath = GETCLIP(base||'Path')
- lastext = GETCLIP(base||'Ext')
-
- IF lastpath = "" THEN DO
- GetPrefs SavePath
- lastpath = result
- END
-
- IF lastext = "" THEN lastext = ".24"
-
- Gadget.1 = 'STRING 120 5 200 14 "Output Path:" "'lastpath'"'
- Gadget.2 = 'FILEREQ 321 5 20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
- Gadget.3 = 'STRING 120 20 200 14 "New Extension:" "'lastext'"'
- Gadget.4 = 'TEXT 120 36 1 1 "(** = current frame number)" 1'
- Gadget.5 = 'END'
-
- NewComplexRequest '"Save Buffer As ILBM w/Alpha"' Gadget 360 55
- IF rc ~= 0 THEN EXIT rc
-
- CALL SETCLIP(base||'Path', result.1)
- CALL SETCLIP(base||'Ext', result.3)
-
- EXIT
-